SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 67606: Using the UseDeclareFetch PostgreSQL option might prevent "Out of memory" errors when you read from PostgreSQL

DetailsHotfixAboutRate It

In some cases, when reading large amounts of data from PostgreSQL into SAS® software, you might encounter an error similar to the following:

ERROR: CLI describe error: Out of memory while reading tuples.;No query has been executed with that handle

If you are using SAS/ACCESS® Interface to PostgreSQL, adding the PostgreSQL driver option UseDelcareFetch can help eliminate this error. When you use this option in a LIBNAME or Explicit Pass-Through statement, you must also use the CONOPTS= option, as shown below:

libname x postgres server=xxxx conopts="UseDeclareFetch=1";

If you are  using the open-source PostgreSQL driver with SAS/ACCESS® Interface to ODBC, you must add the option to your ODBC data source.

Click the Hot Fix tab in this note to access the hot fix for this issue.

The hot fix in this SAS Note is for the Threaded Kernel Table Services (TKTS) PostgreSQL Driver commonly used by SAS® Federation Server. This hot fix adds a TK option called USE_DECLARE_FETCH and sets it to YES by default. If you do not want this option enabled after applying the hot fix, you can add the option to the connection string to disable it by specifying NO, as shown below:

"DRIVER=FEDSQL;conopts=(DRIVER=POSTGRES;SERVER=machine.name.com;PORT=5432;database=pg1; UID=user1;PWD=pass1;USE_DECLARE_FETCH=NO;CATALOG=POSTGRES_SERVICE);"


Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS/ACCESS Interface to PostgreSQLMicrosoft Windows Server 2012 R2 Std9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows Server 2012 Datacenter9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8 Enterprise x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8 Pro 32-bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8 Pro x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8.1 Enterprise 32-bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8.1 Enterprise x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8.1 Pro 32-bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8.1 Pro x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 109.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows 8 Enterprise 32-bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft® Windows® for x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows Server 2012 R2 Datacenter9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows Server 2012 Std9.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows Server 20169.4_M79.4_M89.4 TS1M79.4 TS1M8
Microsoft Windows Server 20199.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Enterprise 32 bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Enterprise x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Home Premium 32 bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Home Premium x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Professional 32 bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Professional x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Ultimate 32 bit9.4_M79.4_M89.4 TS1M79.4 TS1M8
Windows 7 Ultimate x649.4_M79.4_M89.4 TS1M79.4 TS1M8
64-bit Enabled AIX9.4_M79.4_M89.4 TS1M79.4 TS1M8
64-bit Enabled Solaris9.4_M79.4_M89.4 TS1M79.4 TS1M8
HP-UX IPF9.4_M79.4_M89.4 TS1M79.4 TS1M8
Linux for x649.4_M79.4_M89.4 TS1M79.4 TS1M8
Solaris for x649.4_M79.4_M89.4 TS1M79.4 TS1M8
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.